import { createApp } from 'vue'
// import './style.css'
import ElementPlus from 'element-plus' //引入element-plus
import 'element-plus/dist/index.css' //引入element-plus样式
import 'element-plus/theme-chalk/index.css'
import axios from 'axios'   //引入axios
import router from './router'
import VueAxios from 'vue-axios'
import { Plus } from '@element-plus/icons-vue';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 引入 Pinia,用于状态管理
import { createPinia } from 'pinia'
import Antd from 'ant-design-vue' // 引入 antd,提供了大量实用且美观的组件
import 'ant-design-vue/dist/reset.css'// 引入重置样式
import "quill/dist/quill.snow.css"; // 引入 Quill 的样式
//import CryptoJS from 'crypto-js'  // 引入加密库；已安装
import store from './util/ShouquanNeirong'

import App from './App.vue'

const app = createApp(App)
app.use(ElementPlus) //挂载
// 注册 ElementPlus 的所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(router)
app.use(Antd)
app.use(store)
app.use(createPinia())
// 引入axios
app.use(VueAxios,axios)
// 挂载axios;将 axios 组件注入全局 axios, 这样才能全局使用
app.provide('axios',app.config.globalProperties.axios)
// 注册全局图标
// for (const [key, component] of Object.entries(ElementPlusIcons)) {
//   app.component(key, component)
// }
// app.component('QuillEditor', QuillEditor)

app.mount('#app')
